<template>
  <div class="sign-detail">
    <div class="query-container">
      <el-form inline label-width="100px">
        <el-form-item label="特殊标识数据">
          <el-select v-model="markValue" placeholder="请选择" @change="markChange" clearable>
            <el-option
              v-for="(item,index) in markOptions"
              :key="index"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="float: right">
          <el-button @click="handelClose">关闭</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="bottom-container">
      <el-form>
        <el-form-item style="float: right">
          <el-button type="default"
                     icon="el-icon-s-promotion"
                     @click="handleExport">导出</el-button>
        </el-form-item>
      </el-form>
      <el-table class="table-container"
                stripe
                border
                :data="tableData"
                v-loading="loading"
                element-loading-text="加载中"
                element-loading-spinner="el-icon-loading">
          <el-table-column
          v-for="(column, index) in columns"
            :key="index"
            :prop="column.prop"
            :label="column.name"
            :width="column.width"
            :sortable="sortableProp(column.name)"
          >
            <template slot-scope="scope">
              <span v-if="column.prop == 'planArriveTimeExport'">
                  {{scope.row.shTimeShowFlag?
                    transition((scope.row[column.prop]),column.props):'--'}}</span>
              <span v-else>{{transition((scope.row[column.prop]),column.props)}}</span>
            </template>
          </el-table-column>
      </el-table>
      <el-pagination v-show="tableData.length > 0"
                     background
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total"
                     :page-sizes="pageSizeOptions"
                     :page-size.sync="pageSize"
                     :current-page.sync="pageNo"
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange">
      </el-pagination>
    </div>
  </div>
</template>

<script src="./rmsJs/KpiDetail.js"></script>

<style scoped>
.table-container >>> .el-table__body-wrapper {
  height: calc(100% - 50px);
  overflow-y: auto;
}
.bottom-container >>> .el-pagination {
  margin-top: 20px;
  /* text-align: right; */
}
.bottom-container >>> .el-table tr {
  background-color: var(--prev-bg-white);
  height: 50px;
  font-size: 14px;
}
.sign-detail >>> .el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
  border-bottom: 1px solid var(--prev-border-color-lighter);
  font-size: 14px;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 20px;
  color: #333333;
  opacity: 1;
}
</style>
<style lang="scss" scoped>
.sign-detail {
  width: 100%;
  height: 100%;
  .query-container {
    padding: 20px;
    background: var(--prev-bg-white);
  }
  .bottom-container {
    padding: 20px;
    margin-top: 12px;
    background: var(--prev-bg-white);
    height: calc(100vh - 270px);
    .table-container {
      height: calc(100% - 100px);
      .target-power {
        display: flex;
        .power {
          display: flex;
          align-items: center;
        }
      }
    }
  }
}
</style>
